package com.xiekong.rpc.bean;

/**
 * 封装RPC响应
 * @author XieKong
 */
public class RpcResponse {
    /**
     * 请求ID
     */
    private String requestId;
    /**
     * 相应结果
     */
    private Object result;
    /**
     * 异常
     */
    private Throwable exception;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Throwable exception) {
        this.exception = exception;
    }

    public boolean hasException() {
        return exception != null;
    }
}
